![]() |
PATH![]() |
If you want to define proxy servers for a session, you can do so using the
JMSetProxyInfo
function
JMSetProxyInfo
. A proxy server essentially acts as a gateway when you access data over a network. For example, if your company has a security firewall, all requests for code or data external to the company network must pass through the firewall before reaching the desired server. You can designate proxy servers for HTTP access, FTP access, and firewall access.
Note
If you allowed the use of the InternetConfig settings when creating the session, any proxy information defined there is used for the default settings.
You pass a proxy server options structure to the JMSetProxyInfo function for each type of server. For example, Listing 1-2 sets a firewall proxy server.
Listing 1-2 Specifying a firewall proxy server
JMProxyInfo myFirewallProxyInfo {
true, /* allow a proxy for this type of server access */
"TheWall.myCompany.com", /* the name of the server */
80}; /* the port number of the server */
JMSetProxyInfo(theSession, eFirewallProxy, &myFirewallProxyInfo);
The myFirewallProxyInfo structure specifies the firewall server by name and by port number. (If you wanted to specify HTTP or FTP proxy servers, you would create a structure for each of them as well.) You then set these values by calling the JMSetProxyInfo function and specifying the firewall proxy.
To read proxy information for a given session, you must call the
JMGetProxyInfo
function
JMGetProxyInfo
. See
Proxy Server Options and
Session Security Indicators for more information about the values you pass to these functions.